<template>
  <div>
    <div class="swiper-container12">
      <div class="swiper-wrapper">
        <div class="swiper-slide" v-for="(e, i) in photo" :key="i">
          <!-- <img class="photo" :src="`${e}`" alt="" /> -->
          <img class="photo" v-layz="e" :key="e" />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Swiper from "swiper";
export default {
  name: "photo",
  props: ["photo"],
  mounted() {
    // console.log(this.photo);
    var mySwiper2 = new Swiper(".swiper-container12", {
      autoplay: false, //可选选项，自动滑动
      slidesPerView: 2,
      slidesPerGroup: 2,
      observer: true, //修改swiper自己或子元素时，自动初始化swiper
      observeParents: true, //修改swiper的父元素时，自动初始化swiper
    });
  },
};
</script>

<style lang="scss" scoped>
.swiper-container12 {
  .swiper-wrapper {
    .swiper-slide {
      .photo {
        width: 170px;
        height: 100px;
        border-radius: 7px;
        object-fit: cover;
      }
    }
  }
}
</style>